import React, { useEffect, useState } from 'react'
import { View, Image } from '@tarojs/components'
import Taro from '@tarojs/taro'
import Router from '@/utils/router'
import './index.scss'
const ShopList = (props) => {
    const { } = props
    const list = Taro.getStorageSync("formList");
    const defaultImage = 'https://wx.gy.cn/wechatImage/defaultImg.png'
    return <View className='wxPage_Form_style2'>
        <View className='list-style-list'>
            {list.map(val => {
                const { title, cover, id } = val
                return <View onClick={() => {
                    Router('collectWps', {
                        args: {
                            id: id
                        }
                    })
                }} className='form-item'>
                    <View className='item-image'>
                        <Image style={{ width: '100%', height: '100%' }} src={cover || defaultImage}></Image>
                    </View>
                    <View className='item-info'>
                        <View className='item-info-title'>{title}</View>
                    </View>
                </View>
            })}
        </View>
    </View>
}
export default ShopList